/*
 * Metaverse Core
 * Copyright (C) 2010 Vyacheslav Vorobyov, All rights reserved.
 * See LICENSE for full license information.
 */
package org.metaverse.warehouse;

import org.metaverse.warehouse.Senary.Slot;
import org.metaverse.warehouse.com.Constraint;

/**
 * This interface describes data structure that 
 * contains sufficient data to perform most 
 * complicated senary fetch.
 * 
 * @author vjache
 * @see Fetcher
 */
public interface FetchSpecification {
	/**
	 * Returns senary constraint.
	 */
	Constraint getConstraint();
	/**
	 * Returns slots of senary used to order results.
	 */
	Slot[] getOrderBy();
	/**
	 * Returns a cursor position offset to apply when 
	 * returning fetch results.
	 */
	int getOffset();
	/**
	 * Returns a maximum number of senaries returned in results.
	 */
	int getLimit();
	/**
	 * <p>
	 * Returns a slots intended to be used. Actually all 
	 * slots can be used in senary but this method gives 
	 * an underlying engine an optimization hint about 
	 * what slots actually be used in client code. 
	 * </p>
	 * <p>
	 * For example this knowledge may be used to 'warm up' 
	 * internal cache with only nodes that will be used by 
	 * client code.
	 * </p>
	 */
	Slot[] getSelected();

}